language: c
dist: trusty
sudo: true

matrix:
  include:
  - os: linux
    compiler: gcc
    env:
    - CC_OVERRIDE=gcc
    - ENABLE_SIG_PICNIC=0
    - USE_OPENSSL=1
    - CHECK_STYLE=true
    addons:
      apt:
        sources:
        - ubuntu-toolchain-r-test
        packages:
        - doxygen
        - graphviz
    before_install:
    - sh .travis/install-clang-format-linux.sh
  - os: linux
    compiler: gcc
    env:
    - CC_OVERRIDE=gcc-4.9
    - ENABLE_SIG_PICNIC=0
    addons:
      apt:
        sources:
        - ubuntu-toolchain-r-test
        packages:
        - gcc-4.9
        - doxygen
        - graphviz
    before_install:
    - sh .travis/install-clang-format-linux.sh
  - os: linux
    compiler: gcc
    env: CC_OVERRIDE=gcc-5
    addons:
      apt:
        sources:
        - ubuntu-toolchain-r-test
        packages:
        - gcc-5
        - doxygen
        - graphviz
  - os: linux
    compiler: gcc
    env:
    - CC_OVERRIDE=gcc-6
    - USE_OPENSSL=1
    addons:
      apt:
        sources:
        - ubuntu-toolchain-r-test
        packages:
        - gcc-6
        - libssl-dev
        - doxygen
        - graphviz
  - os: osx
    compiler: clang
    env:
    - CC_OVERRIDE=clang
    - AES_NI=0
    - USE_OPENSSL=1
    - OPENSSL_DIR=/usr/local/opt/openssl # openssl is a keg-only package
    before_install:
    - brew update
    - brew install libsodium doxygen graphviz
  - os: osx
    compiler: clang
    env:
    - CC_OVERRIDE=clang
    - AES_NI=0
    - USE_OPENSSL=1
    - OPENSSL_DIR=/usr/local/opt/openssl # openssl is a keg-only package
    before_install:
    - brew update
    - brew install libsodium doxygen graphviz
  - os: osx
    compiler: clang
    env:
    - CC_OVERRIDE=clang
    - AES_NI=0
    before_install:
    - brew update
    - brew install doxygen graphviz

script:
  - .travis/all-tests.sh
